<%--
  Created by IntelliJ IDEA.
  User: CY
  Date: 2018/5/16
  Time: 15:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%  String point=(String) request.getSession().getAttribute("coordinatePoint");%>
<html>
<head>
    <title>智慧城建</title>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=YECw4heQ9wzy7RKg8OW9QLMsySKzQRan"></script>
    <link rel="stylesheet" type="text/css" href="/css/street/street.css"/>
    <link rel="stylesheet" href="/css/officialDocument/officialDocument.css">
    <link rel="stylesheet" href="/css/base.css">
    <link rel="stylesheet" href="/lib/layer/skin/default/layer.css">
    <%--<script src="/js/street/TwoPointFive.js"></script>--%>
    <style>
        html{height:100%}
        body{height:100%;margin:0px;padding:0px}
        .head{height:50px}
        #map{width:100%;height:100%}
        .rightNav {
            position: fixed;
            top: 20%;
            right: 1%;
            width: 135px;
            height: 220px;
            z-index: 999;
            /*display: none;*/
        }
        .rightNav .one{
            background: url(/img/grid/btnxuanzhong.png) no-repeat;
            background-size: 100% 100%;
            -ms-behavior: url(/css/main/backgroundsize.min.htc);
            behavior: url(/css/main/backgroundsize.min.htc);
            width: 96%;
            height: 34px;
            line-height: 34px;
            margin-top: 10px;
            cursor: pointer;
            color: #fff;
            text-align: center;
            font-size: 14px;
        }
        .rightNav .one.active {
            background: url(/img/grid/activexuanzhong.png) no-repeat;
        }
        .rightNav .one:hover{
            background: url(/img/grid/activexuanzhong.png) no-repeat;
        }

        .leftNav {
            position: fixed;
            top: 20%;
            left: 1%;
            width: 135px;
            height: 220px;
            z-index: 999;
            display: none;
        }
        .leftNav .two{
            background: url(/img/grid/btnxuanzhong.png) no-repeat;
            background-size: 100% 100%;
            -ms-behavior: url(/css/main/backgroundsize.min.htc);
            behavior: url(/css/main/backgroundsize.min.htc);
            width: 96%;
            height: 34px;
            line-height: 34px;
            margin-top: 10px;
            cursor: pointer;
            color: #fff;
            text-align: center;
            font-size: 14px;
        }
        .leftNav .two.active {
            background: url(/img/grid/activexuanzhong.png) no-repeat;
        }
        .leftNav .two:hover{
            background: url(/img/grid/activexuanzhong.png) no-repeat;
        }
        .outer{
            width:90px;
            height:30px;
            position:absolute;
            background-size:100% ;
            z-index: 99999;
            cursor:pointer;
        }
        .inner{
            color:#fff;
            font-size:14px;
            display: inline-block;
            width:73px;
            text-align: center;
            position: relative;
            cursor:pointer;
            /*line-height: 36px;*/
            /*padding-left:40px;*/
            /*padding-top: 4px;*/
            /*word-break: break-all;*/
            /*text-overflow: ellipsis;*/
            /*display: -webkit-box; !** 对象作为伸缩盒子模型显示 **!*/
            /*-webkit-box-orient: vertical; !** 设置或检索伸缩盒对象的子元素的排列方式 **!*/
            /*-webkit-line-clamp: 1; !** 显示的行数 **!*/
            /*overflow: hidden;  !** 隐藏超出的内容 **!*/
        }
        .txt{
            color:#fff;
            font-size:14px;
            display: inline-block;
            width:56px;
            text-align: center;
            position: relative;
            cursor:pointer;
            line-height: 23px;
            padding-left:32px;
            padding-top: 4px;
            word-break: break-all;
            text-overflow: ellipsis;
            display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
            -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
            -webkit-line-clamp: 1; /** 显示的行数 **/
            overflow: hidden;  /** 隐藏超出的内容 **/
        }
        .headImg{
            position: absolute;
            left: -37px;
            top: 0px;
        }
        .topName{
            display: inline-block;
            width: 80px;
            line-height: 30px;
            padding-left: 30px;
            text-align: left;
        }
        .botName{
            display: inline-block;
            width: 100px;
            line-height: 22px;
            padding-left: 30px;
            text-align: left;
        }

        .clearfx{
            width:100%;
            line-height: 50px;
            font-size:14px;
            /*height: 50px;*/
        }
        .cont{
            border-bottom: 1px dashed #eeeeee;
            width:80%;
            /*height:50px;*/
            /*margin-left: 40px;*/
            float:left
        }
        .left{
            /*width:30%;*/
            /*float:left;*/
            text-align: right;
            margin-left:3px;
        }
        .right{
            width:64%;
            /*float:left;*/
            text-align: left;
            margin-left:5%;
        }
        .img{
            float:left;
            vertical-align: middle;
            margin-top: 15px;
            margin-left:20px;
        }
        table{
            width:90%;
           margin:10px auto;
        }
    </style>
    <script src="/js/jquery/jquery-1.9.1.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/layer/layer.js?20201106" type="text/javascript" charset="utf-8"></script>
    <script src="/js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <%--<script type="text/javascript" src="/js/street/Library.js"></script>--%>
</head>
<body onload="maps.oil()">
<ul class="rightNav">
    <li class="one active" data-type="0">环保设施</li>
    <li class="one" data-type="1">动态监管台账</li>
</ul>
<ul class="qiye leftNav" style="display: block">
    <li class="two active" data-type="0">油烟在线监测</li>
    <li class="two" data-type="1">微型站点监测</li>
</ul>

<ul class="taizang leftNav">
    <li class="two active" data-type="0">餐饮企业</li>
    <li class="two" data-type="1">开墙打洞</li>
    <li class="two" data-type="2">开墙打洞（经营）</li>
    <li class="two" data-type="3">汽修企业</li>
    <li class="two" data-type="4">在建工地</li>
    <li class="two" data-type="5">门前三包</li>
    <li class="two" data-type="6">无证无照</li>
</ul>
<div id="map"></div>
<script>

    var map = new BMap.Map("map");
  //  var point = new BMap.Point(118.019131,34.341107);
    var point = new BMap.Point(<%=point%>); //创建点坐标

    var map = new BMap.Map("map", {mapType: BMAP_HYBRID_MAP, minZoom: 1, maxZoom: 18});
    //设置地图类型及最小最大级别
    //    var marker = new BMap.Marker(point); //将点转化成标注点
    //    map.addOverlay(marker);  //将标注点添加到地图上
    //设置地图级别（1-18）
    //添加地图类型控件
    map.addControl(new BMap.MapTypeControl({
        mapTypes:[
            BMAP_NORMAL_MAP,
            BMAP_HYBRID_MAP
        ]}));
    map.centerAndZoom(point, 12);
    //开启滚轮缩放地图
    map.enableScrollWheelZoom();

    //    绘制自定义覆盖物
    //    //        1\定义构造函数
    function ComplexCustomOverlay(point,img,name,id,con,grid,type,title){
        this._point = point;
        this._img = img;
        this._name = name;
        this._id = id;
        this._con = con;
        this._grid = grid;
        this._type = type;
        this._title = title;
    }
    // 继承API的BMap.Overlay
    ComplexCustomOverlay.prototype = new BMap.Overlay();
    //2、初始化自定义覆盖物实现初始化方法
    ComplexCustomOverlay.prototype.initialize = function(map){
        // 保存map对象实例
        this._map = map;
        // 创建div元素，作为自定义覆盖物的容器
        var div = this._div = document.createElement("div");
        div.style.backgroundImage = 'url('+this._img+')'
        div.setAttribute('class','outer');
        div.setAttribute('name',this._name);
        div.setAttribute('id',this._id);
        div.setAttribute('content',this._con);
        div.setAttribute('grid',this._grid);
        div.setAttribute('type',this._type);
        div.setAttribute('title',this._title);

        div.innerHTML= '<div class="inner">'+this._con+'</div>'
        // 将div添加到覆盖物容器中
        map.getPanes().labelPane.appendChild(div);
        //getPanes(),返回值:MapPane,返回地图覆盖物容器列表  labelPane呢???
        // 需要将div元素作为方法的返回值，当调用该覆盖物的show、
        // hide方法，或者对覆盖物进行移除时，API都将操作此元素。
        return div;
    }
    //3、绘制覆盖物
    // 实现绘制方法
    ComplexCustomOverlay.prototype.draw = function(){
        var _map = this._map;
//            var marker = new BMap.Marker(_map);
//            map.overlayPixelToPoint(this._point);
        var pixel = map.pointToOverlayPixel(this._point);
        this._div.style.left = pixel.x - 50 + "px";
        this._div.style.top  = pixel.y - 20 + "px";
    }

    //    nav点击事件
    $('.rightNav .one').click(function(){
        $(this).addClass('active').siblings().removeClass('active');
        if($(this).attr('data-type')==0){
            $('.qiye').show();
            $('.taizang').hide();
            $('.qiye li').eq(0).addClass('active').siblings().removeClass('active');
            map.clearOverlays();
            maps.oil();
        }else if($(this).attr('data-type')==1){
            $('.qiye').hide();
            $('.taizang').show();
            $('.taizang li').eq(0).addClass('active').siblings().removeClass('active');
            map.clearOverlays();
            maps.eat();
        }
    })
    $('.qiye .two').click(function(){
        $(this).addClass('active').siblings().removeClass('active');
        if($(this).attr('data-type')==0){
            map.clearOverlays();
            maps.oil();
        }else if($(this).attr('data-type')==1){
            map.clearOverlays();
            maps.miniature()
        }
    })
    $('.taizang .two').click(function(){
        $(this).addClass('active').siblings().removeClass('active');
        if($(this).attr('data-type')==0){
            map.clearOverlays();
            maps.eat();
        }else if($(this).attr('data-type')==1){
            map.clearOverlays();
            maps.openWall()
        }else if($(this).attr('data-type')==2){
            map.clearOverlays();
            maps.openWallManager()
        }else if($(this).attr('data-type')==3){
            map.clearOverlays();
            maps.car()
        }else if($(this).attr('data-type')==4){
            map.clearOverlays();
            maps.build()
        }else if($(this).attr('data-type')==5){
            map.clearOverlays();
            maps.door()
        }else if($(this).attr('data-type')==6){
            map.clearOverlays();
            maps.unlicensed()
        }
    })

    function check(name){
        if(name == undefined){
            return ''
        }else{
            return name;
        }
    }

    $(document).on('click','.outer',function(){
        var type=$(this).attr('type');
        var id = $(this).attr('id');
        var name = $(this).attr('name');
        if(type == 1){
            $.get('/TrashDetectionController/trdeSelectList',{tinid:id,
                page:1,
                pageSize:10,
                useFlag:true},function(res){
                var data= res.obj;
                layer.open({
                    type:1,
                    title: ['油烟在线信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['650px', '520px'],
                    btn: 0,
                    content:'<table>' +
                        '<thead><tr><th style="width:20%">名称</th><th style="width:30%">位置</th><th>联系人</th><th>联系电话</th><th>设备状态</th></tr></thead><tbody class="list">' +
                    '</tbody></table>',
                    success:function(){
                        var str =''
                        for(var i=0;i<data.length;i++){
                            str += '<tr><td>'+data[i].enterpriseName+'</td><td>'+data[i].xydz+'</td><td>'+data[i].telname+'</td><td>'+data[i].tel+'</td><td>'+data[i].menke+'</td></tr>'
                        }
                        $('.list').html(str)
                    }
                })
            })
        }else if(type == 2){
            $.get('/TrashMiniatureController/trminSelectList',{mid:id,
                page:1,
                pageSize:10,
                useFlag:true},function(res){
                var data= res.obj;
                layer.open({
                    type:1,
                    title: ['微型站点信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['650px', '520px'],
                    btn: 0,
                    content:'<table>' +
                    '<thead><tr><th style="width:20%">社区名称</th><th style="width:30%">位置</th><th>联系人</th><th>联系电话</th></tr></thead><tbody class="list">' +
                    '</tbody></table>',
                    success:function(){
                        var str =''
                        for(var i=0;i<data.length;i++){
                            str += '<tr><td>'+data[i].deptName+'</td><td>'+data[i].tdw+'</td><td>'+data[i].userId+'</td><td>'+data[i].tel+'</td></tr>'
                        }
                        $('.list').html(str)
                    }
                })
            })
        }else if(type == 3){
            $.get('/enCaterParameter/selectByList',{s1:name,
                page:1,
                pageSize:10,
                useFlag:true},function(res){
                var data= res.obj;
                layer.open({
                    type:1,
                    title: ['餐饮企业信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['650px', '520px'],
                    btn: 0,
                    content:'<table>' +
                    '<thead><tr><th style="width:20%">公司名称</th><th style="width:30%">位置</th><th>负责人</th><th>联系电话</th></tr></thead><tbody class="list">' +
                    '</tbody></table>',
                    success:function(){
                        var str =''
                        for(var i=0;i<data.length;i++){
                            str += '<tr><td>'+data[i].unit+'</td><td>'+data[i].unitAddress+'</td><td>'+data[i].cantact+'</td><td>'+data[i].phoneNumber+'</td></tr>'
                        }
                        $('.list').html(str)
                    }
                })
            })
        }else if(type == 4){
            $.get('/enOpenHole/selectByList',{s1:name,
                page:1,
                pageSize:10,
                useFlag:true},function(res){
                var data= res.obj;
                layer.open({
                    type:1,
                    title: ['开墙打洞信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['650px', '520px'],
                    btn: 0,
                    content:'<table>' +
                    '<thead><tr><th style="width:25%">台账编号</th><th style="width:30%">位置</th><th>所属街道</th><th>具体街道号码</th></tr></thead><tbody class="list">' +
                    '</tbody></table>',
                    success:function(){
                        var str =''
                        for(var i=0;i<data.length;i++){
                            str += '<tr><td>'+data[i].parameterNum+'</td><td>'+data[i].detailAddress+'</td><td>'+data[i].streetRoad+'</td><td>'+data[i].streetNum+'</td></tr>'
                        }
                        $('.list').html(str)
                    }
                })
            })
        }else if(type == 5){
            $.get('/enHoleBusiness/selectById',{bid:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['开墙打洞经营信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">房屋所有者姓名:</span><span class="right">'+check(data.houseOwnName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">房屋地址:</span><span class="right">'+check(data.homeAddress) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">居委会名称:</span><span class="right">'+check(data.committeeName)+'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">经营者姓名:</span><span class="right">'+check(data.operatorName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">经营项目:</span><span class="right">'+check(data.bussinessProject) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 6){
            $.get('/enAutoCompany/selectById',{cid:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['汽修企业信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">单位:</span><span class="right">'+check(data.unit) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">单位地址:</span><span class="right">'+check(data.unitAddress)+'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">联系人:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">联系电话:</span><span class="right">'+check(data.contactNum) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 7){
            $.get('/enConstructionSite/selectById',{sid:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['在建工地信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">工程名称:</span><span class="right">'+check(data.projectName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">建设工程地址:</span><span class="right">'+check(data.projectAddress)+'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.responsiblePerson) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contactNum) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 8){
            $.get('/enDoorThree/selectByList',{t1:name,
                page:1,
                pageSize:10,
                useFlag:true},function(res){
                var data= res.obj;
                layer.open({
                    type:1,
                    title: ['门前三包信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['650px', '520px'],
                    btn: 0,
                    content:'<table>' +
                    '<thead><tr><th style="width:20%">牌匾名称</th><th style="width:30%">地址</th><th>经营者姓名</th><th>联系电话</th></tr></thead><tbody class="list">' +
                    '</tbody></table>',
                    success:function(){
                        var str =''
                        for(var i=0;i<data.length;i++){
                            str += '<tr><td>'+data[i].name+'</td><td>'+data[i].address+'</td><td>'+data[i].operatorName+'</td><td>'+data[i].phoneNumber+'</td></tr>'
                        }
                        $('.list').html(str)
                    }
                })
            })
        }else if(type == 9){
            $.get('/enUnlicense/selectByList',{gridLocation:name,
                page:1,
                pageSize:10,
                useFlag:true},function(res){
                var data= res.obj;
                layer.open({
                    type:1,
                    title: ['无证无照信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['650px', '520px'],
                    btn: 0,
                    content:'<table>' +
                    '<thead><tr><th style="width:20%">经营项目</th><th style="width:30%">经营地址</th><th>经营者姓名</th><th>经营者电话</th></tr></thead><tbody class="list">' +
                    '</tbody></table>',
                    success:function(){
                        var str =''
                        for(var i=0;i<data.length;i++){
                            str += '<tr><td>'+data[i].plaque+'</td><td>'+data[i].businessAddress+'</td><td>'+data[i].operateName+'</td><td>'+data[i].operatePhone+'</td></tr>'
                        }
                        $('.list').html(str)
                    }
                })
            })
        }
    })



    var maps={
//        油烟在线
        oil:function(){
            var overlays = [];
            $.ajax({
                url:'/TrashDetectionController/trdeSelect',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation !="" && data[i].gridLocation != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].gridLocation.split(',')[0];
                        var lat = overlays[j].gridLocation.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/oil.png';
//                        var con = ''
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].enterpriseName,overlays[j].tinid ,'','',1,overlays[j].enterpriseName );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
//        微型站点
        miniature:function(){
            var overlays = [];
            $.ajax({
                url:'/TrashMiniatureController/trminSelect',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation !="" && data[i].gridLocation != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].gridLocation.split(',')[0];
                        var lat = overlays[j].gridLocation.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/wei.png';
//                        var con = ''
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].userId,overlays[j].mid ,'','',2,overlays[j].deptName );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

//        餐饮企业
        eat:function(){
            var overlays = [];
            $.ajax({
                url:'/enCaterParameter/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].s1 !="" && data[i].s1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].s1.split(',')[0];
                        var lat = overlays[j].s1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/eat.png';
                        var con = '<span class="txt">'+overlays[j].unit+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].s1,overlays[j].cid ,con,'',3,overlays[j].unit );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

//        开墙打洞
        openWall:function(){
            var overlays = [];
            $.ajax({
                url:'/enOpenHole/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].s1 !="" && data[i].s1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].s1.split(',')[0];
                        var lat = overlays[j].s1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/open.png';
                        var con = ''
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].s1,overlays[j].oid ,con,'',4,overlays[j].streetRoad );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

//        开墙打洞经营
        openWallManager:function(){
            var overlays = [];
            $.ajax({
                url:'/enHoleBusiness/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].str1 !="" && data[i].str1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].str1.split(',')[0];
                        var lat = overlays[j].str1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/openMan.png';
                        var con = ''
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].str1,overlays[j].bid ,con,'',5,overlays[j].committeeName );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },


//        汽修企业
        car:function(){
            var overlays = [];
            $.ajax({
                url:'/enAutoCompany/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].remark1 !="" && data[i].remark1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].remark1.split(',')[0];
                        var lat = overlays[j].remark1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/xiu.png';
                        var con = '<span class="txt">'+overlays[j].unitAddress+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].remark1,overlays[j].cid ,con,'',6,overlays[j].unitAddress );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

        //        在建工地
        build:function(){
            var overlays = [];
            $.ajax({
                url:'/enConstructionSite/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].no1 !="" && data[i].no1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].no1.split(',')[0];
                        var lat = overlays[j].no1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/build.png';
                        var con = ''
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].no1,overlays[j].sid ,con,'',7,overlays[j].projectName );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

        //        门前三包
        door:function(){
            var overlays = [];
            $.ajax({
                url:'/enDoorThree/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].t1 !="" && data[i].t1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].t1.split(',')[0];
                        var lat = overlays[j].t1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/door.png';
                        var con = '<span class="txt">'+overlays[j].plaqueName+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].t1,overlays[j].tid ,con,'',8,overlays[j].plaqueName );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

        //        无证无照
        unlicensed:function(){
            var overlays = [];
            $.ajax({
                url:'/enUnlicense/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation !="" && data[i].gridLocation != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].gridLocation.split(',')[0];
                        var lat = overlays[j].gridLocation.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/unlicensed.png';
                        var con = '';
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].gridLocation,overlays[j].mid ,con,'',9,overlays[j].plaque );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
    }

</script>
</body>
</html>
